namespace org.jawk.jrt
{
	/// <summary>The AWK Variable Manager.</summary>
	/// <remarks>
	/// The AWK Variable Manager.
	/// It provides getter/setter methods for global AWK variables.
	/// Its purpose is to expose a variable management interface to
	/// the JRT, even though the implementation is provided by
	/// the AWK script at script compile-time.
	/// <p>
	/// The getters/setters here do not access <strong>all</strong>
	/// special AWK variables, such as <code>RSTART</code>
	/// and <code>ENVIRON</code>.  That's because these variables
	/// are not referred to within the JRT.
	/// </remarks>
	/// <seealso cref="JRT">JRT</seealso>
	/// <seealso cref="org.jawk.backend.IAwkCompiler">org.jawk.backend.IAwkCompiler</seealso>
	/// <seealso cref="org.jawk.backend.AwkCompilerImpl">org.jawk.backend.AwkCompilerImpl
	/// 	</seealso>
	/// <author>Danny Daglas</author>
	public interface IVariableManager
	{
		/// <summary>Retrieve the contents of the ARGC variable.</summary>
		/// <remarks>Retrieve the contents of the ARGC variable.</remarks>
		object GetARGC();

		/// <summary>Retrieve the contents of the ARGV variable.</summary>
		/// <remarks>Retrieve the contents of the ARGV variable.</remarks>
		object GetARGV();

		/// <summary>Retrieve the contents of the CONVFMT variable.</summary>
		/// <remarks>Retrieve the contents of the CONVFMT variable.</remarks>
		object GetCONVFMT();

		/// <summary>Retrieve the contents of the FS variable.</summary>
		/// <remarks>Retrieve the contents of the FS variable.</remarks>
		object GetFS();

		/// <summary>Retrieve the contents of the RS variable.</summary>
		/// <remarks>Retrieve the contents of the RS variable.</remarks>
		object GetRS();

		/// <summary>Retrieve the contents of the OFS variable.</summary>
		/// <remarks>Retrieve the contents of the OFS variable.</remarks>
		object GetOFS();

		/// <summary>Retrieve the contents of the SUBSEP variable.</summary>
		/// <remarks>Retrieve the contents of the SUBSEP variable.</remarks>
		object GetSUBSEP();

		/// <summary>Set the contents of the FILENAME variable.</summary>
		/// <remarks>Set the contents of the FILENAME variable.</remarks>
		void SetFILENAME(string new_filename);

		/// <summary>Set the contents of the NF variable.</summary>
		/// <remarks>Set the contents of the NF variable.</remarks>
		void SetNF(int new_nf);

		/// <summary>Increases the NR variable by 1.</summary>
		/// <remarks>Increases the NR variable by 1.</remarks>
		void IncNR();

		/// <summary>Increases the FNR variable by 1.</summary>
		/// <remarks>Increases the FNR variable by 1.</remarks>
		void IncFNR();

		/// <summary>Resets the FNR variable to 0.</summary>
		/// <remarks>Resets the FNR variable to 0.</remarks>
		void ResetFNR();

		/// <summary>
		/// Set the contents of a user-defined AWK
		/// variable.
		/// </summary>
		/// <remarks>
		/// Set the contents of a user-defined AWK
		/// variable.  Used when processing
		/// <em>name=value</em> command-line arguments
		/// (either via -v or via ARGV).
		/// </remarks>
		/// <param name="name">The AWK variable name.</param>
		/// <param name="value">The new contents of the variable.</param>
		void AssignVariable(string name, object value);
	}
}
